package cn.wolfcode.rbac.mapper;

import cn.wolfcode.rbac.domain.Employee;
import cn.wolfcode.rbac.query.EmployeeQueryObject;
import cn.wolfcode.rbac.query.QueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface EmployeeMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Employee record);

    Employee selectByPrimaryKey(Long id);

    List<Employee> selectAll();

    int updateByPrimaryKey(Employee record);

    //查总数
    int selectForCount(QueryObject qo);

    //查集合
    List<Employee> selectForList(QueryObject qo);

    //维护与角色关系
    void insertRelation(@Param("empId") Long id, @Param("roleId")Long roleId);

    //删除与救赎关系
    void deleteRelation(Long id);


    //批量删除
    void deleteBatch(Long[] ids);
}